﻿using AutoMapper;
using ETWJ.DTO;
using ETWJ.Model;
using System;
using System.Collections.Generic;
using System.Text;

namespace ETWJ.Common
{
    public class RegisterAutoMapper
    {
        public static void Register()
        {
            Mapper.Initialize(x =>
            {
                x.CreateMap<Employee, EmployeeDTO>().ForMember(e => e.Id, q => {
                    q.MapFrom(z => z.Id);
                });

                x.CreateMap<EmployeeDTO, Employee>().ForMember(e => e.Id, q => {
                    q.MapFrom(z => z.Id);
                });

            });
        }
    }
}
